package com.cndw.kungfu.model.pvp.campcross;

import java.util.Comparator;

public class CampCrossScoreComparator implements Comparator<CampTeam> {

	@Override
	public int compare(CampTeam o1, CampTeam o2) {
		int diff = o1.getPower() - o2.getPower();
		if (diff == 0) {
			if (o2.getMasterId() > o1.getMasterId()) {
				diff = 1;
			}else {
				diff = -1;
			}
		}
		return diff;
	}

}
